<?php

namespace App\Repositories\Transformers;

use App\Models\GovernmentInfo;
use League\Fractal\TransformerAbstract;

class GovernmentInfoListTransformer extends TransformerAbstract
{
    public function transform(GovernmentInfo $governmentInfo)
    {
        return [
            'id' => $governmentInfo->id,
            'title' => $governmentInfo->title,
            'created_at' => $governmentInfo->created_at != null ? $governmentInfo->created_at->toDateTimeString() : null,
        ];
    }
}
